
package com.gp.data;

import java.util.ArrayList;
import java.util.List;

import com.gp.R;
import com.gp.R.raw;

/**
 * @author shijunxing
 * @className CityGuides
 * @date Sep 5, 2013 12:54:38 AM
 * @version 1.0
 * @Description Cityguide类的数据
 */
public class CityGuides {

    // 存放城市指南信息
    public static List<Data> INFORMATION = new ArrayList<CityGuides.Data>();

    // 定义具体描述信息,这里的信息放在res/raw/目录下，这里其实存放的是id
    static int[] descriptions = { R.raw.cg_aboutcity, R.raw.cg_customs,
            R.raw.cg_catering, R.raw.cg_festival, R.raw.cg_transportation,
            R.raw.cg_leave, R.raw.cg_entertainment, R.raw.cg_sppecialties, };

    static String[] title = { "桂林介绍", "风土人情", "饮食文化", "缤纷节日", "市内交通", "离开交通",
            "娱乐", "特产", };
    // 图片地址
    static int[] imaID = { R.drawable.lijaing, R.drawable.cg_fengturenqing,
            R.drawable.cg_yingshiwenhua, R.drawable.cg_bingfenjieri,
            R.drawable.cg_shineijiaotong, R.drawable.cg_likaijiaotong,
            R.drawable.cg_yule, R.drawable.cg_texhan, };

    static {

        // 给信息赋值
        for (int i = 0; i < descriptions.length; i++) {

            CityGuides.INFORMATION.add(new Data(title[i], imaID[i],
                    descriptions[i]));
        }

    }

    // 数据格式类
    public static final class Data {

        public final String title;
        public final int imaID;
        public final int descriptions;

        private Data( String ptitle, int pimaID, int pdescriptions ) {

            this.title = ptitle;
            this.imaID = pimaID;
            this.descriptions = pdescriptions;

        }

    }

}
